.imgPreview {
  display: block;

  :global {
    .arrow {
      top: 50%;
      bottom: 0;
      right: 0;
      background: none;
      border: none;
      color: white;
      cursor: pointer;
      font-size: 48px;
      outline: none;
      padding: 0 2%;
      position: absolute;
      width: 10%;
      transform: translateY(-50%);
      z-index: 1002;

      // disable user select
      user-select: none;
    }

    .arrow-next {
      right: 0;
    }

    .arrow-prev {
      left: 0;
    }

    .rotate {
      bottom: 5px;
      color: #ffffff;
      position: absolute;
      display: flex;
      justify-content: center;
      left: 0;
      right: 0;
    }

    .rotate-left {
      bottom: 0;
      color: #ffffff;
      background: none;
      margin-right: 1em;
      border: 0;
      outline: 0;
      display: inline-block;
      i {
        position: static;
      }
    }

    .rotate-right {
      bottom: 0;
      color: #ffffff;
      background: none;
      border: 0;
      outline: 0;
      display: inline-block;
      i {
        position: static;
      }
    }

    .transform {
      height: 100%;
      margin: auto;
    }

    .backdrop {
      background-color: rgba(0, 0, 0, 0.76);
      bottom: 0;
      left: 0;
      position: fixed;
      right: 0;
      top: 0;
      z-index: 1000;
    }

    .close {
      background: none;
      border: none;
      bottom: -32px;
      color: white;
      cursor: pointer;
      font-size: 16px;
      height: 32px;
      left: 0;
      margin-left: auto;
      margin-right: auto;
      outline: none;
      padding: 0;
      position: absolute;
      right: 0;
      text-align: center;
      text-transform: uppercase;
      width: 100px;
    }

    .dialog {
      position: fixed;
      left: 0;
      right: 0;
      top: 50%;
      z-index: 1001;
      width: 100%;
      height: 100%;
      transform: translateY(-50%);
      line-height: 1;
      margin-left: auto;
      margin-right: auto;
      background-color: rgba(0, 0, 0, 0.76);
      cursor: pointer;
    }

    .image {
      background-color: white;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
      max-height: 80%;
      max-width: 80%;
      position: absolute;

      // center the image within the dialog
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      user-select: none;
    }

    .index-text {
      position: fixed;
      top: 10px;
      left: 50%;
      color: #fff;
      font-weight: bold;
    }

    .close-btn {
      position: absolute;
      right: 0px;
      top: 0;
      color: white;
      cursor: pointer;
      font-size: 20px;
      height: 40px;
      width: 40px;
      line-height: 40px;
      text-align: center;
      text-transform: uppercase;
      z-index: 99;
    }
  }
}
